package com.ebao.po.qa;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ebao.constants.UserType;

/**
 * @desc 问题回答的评论,类似于追问
 * @author snow
 * @date 2012-7-10
 */
@Entity
@Table(name = "T_Comment")
public class TComment implements Serializable {

	private static final long serialVersionUID = -5677197539770761822L;
	
	private Long id;
	private TAnswer answer;			// 追问的TAnswer
	private UserType userType;		// 用户类型user/doctor
	private String referId;			// 用户Id
	private String content;			// 内容
	private String askDate;			// 时间

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(optional = false, targetEntity = TAnswer.class)
	@JoinColumn(name = "answer_id")
	public TAnswer getAnswer() {
		return answer;
	}

	public void setAnswer(TAnswer answer) {
		this.answer = answer;
	}

	public UserType getUserType() {
		return userType;
	}

	public void setUserType(UserType userType) {
		this.userType = userType;
	}

	public String getReferId() {
		return referId;
	}

	public void setReferId(String referId) {
		this.referId = referId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(length = 19)
	public String getAskDate() {
		return askDate;
	}

	public void setAskDate(String askDate) {
		this.askDate = askDate;
	}

}
